package com.huizu.project.controller;

import com.huizu.common.core.controller.BaseController;
import com.huizu.common.core.domain.AjaxResult;
import com.huizu.common.core.page.TableDataInfo;
import com.huizu.project.service.IBurialPointService;
import com.huizu.project.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: pjl
 * @Date: 2024/9/27
 * @ClassName: LargeScreenController
 * @Description: 数据大屏控制层
 */
@RestController
@RequestMapping("/large/screen")
public class LargeScreenController extends BaseController {

    @Autowired
    private IBurialPointService burialPointService;

    /**
     * 获取顶部数据
     * @return
     */
    @GetMapping("/getTopData")
    public AjaxResult getTopData() {
        LargeScreenTopVO vo = burialPointService.getTopData();
        return success(vo);
    }

    /**
     * 左侧数据
     * @return
     */
    @GetMapping("/getLeftData")
    public AjaxResult getLeftData() {
        LargeScreenLeftVO vo = burialPointService.getLeftData();
        return success(vo);
    }

    /**
     * 左侧数据
     * @return
     */
    @GetMapping("/getLeftDataCopy")
    public AjaxResult getLeftDataCopy() {
        List<LabourLeftDataCopyVo> vo = burialPointService.getLeftDataCopy();
        return success(vo);
    }


    /**
     * 左侧数据
     * @return
     */
    @GetMapping("/getRightData")
    public TableDataInfo getRightData() {
        List<LargeScreenRightVO> list = burialPointService.getRightData();
        return getDataTable(list);
    }

    /**
     * 底部数据
     * @return
     */
    @GetMapping("/getBottomData")
    public AjaxResult getBottomData() {
        LargeScreenBottomVo largeScreenBottomVo = burialPointService.getBottomData();
        return success(largeScreenBottomVo);
    }

    /**
     * 左侧更多数据
     * @return
     */
    @GetMapping("/getLeftMoreData")
    public TableDataInfo getLeftMoreData() {
        List<LabourScreenLeftMoreVO> list = burialPointService.getLeftMoreData();
        return getDataTable(list);
    }

    /**
     * 左侧更多数据
     * @return
     */
    @GetMapping("/getLeftMoreDataCopy")
    public TableDataInfo getLeftMoreDataCopy() {
        List<LabourLeftDataCopyVo> list = burialPointService.getLeftMoreDataCopy();
        return getDataTable(list);
    }

    /**
     * 底部数据
     * @return
     */
    @GetMapping("/getBottomDataCopy")
    public AjaxResult getBottomDataCopy() {
        LargeScreenBottomVo largeScreenBottomVo = burialPointService.getBottomDataCopy();
        return success(largeScreenBottomVo);
    }


}
